﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<iss.sg4210.se18.team6s.jass.DAL.Company>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    SearchCompany
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Manage Company</h2>
    <table class="lsttable">
        <%if (Model != null && Model.Count() > 0)
          {
        %>
        <tr class="lstth">
            <th>
                Name
            </th>
            <th>
                Description
            </th>
            <th>
                Contact Name
            </th>
            <th>
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td class="lsttd">
                <%: item.Name %>
            </td>
            <td class="lsttd">
                <%: item.Description %>
            </td>
            <td class="lsttd">
                <%: item.ContactName %>
            </td>
            <td class="lsttd">
                <%: Html.ActionLink("Details", "Details", new { id = item.Id })%>
                |
                <%: Html.ActionLink("Edit", "Edit", new { id=item.Id }) %>
                |
                <%: Html.ActionLink("Delete", "Delete", new { id = item.Id })%>
            </td>
        </tr>
        <% 
            }
          }
          else
          {
        %>
        <th colspan="3">
            No data Found!
        </th>
        <% } %>
    </table>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>
</asp:Content>
